$(function () {
  $.ajaxPrefilter(function (option) {
    option.url = "http://localhost:8080/api/v1" + option.url;  
    option.headers = {
      Authorization: localStorage.getItem("token")
    };
    let loadIndex;
    option.beforeSend = function () {
      loadIndex = layer.load();
    }
    option.complete = function () {
      layer.close(loadIndex);
    }
  })
})

